import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

class HelpCentre extends StatefulWidget {
  @override
  _HelpCentreState createState() => new _HelpCentreState();
}

class _HelpCentreState extends State<HelpCentre> {
  Future<bool> _requestPop() {
    Navigator.pop(context);

    ///弹出页面并传回int值100，用于上一个界面的回调
    return new Future.value(false);
  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new WillPopScope(
        child: new WebviewScaffold(
          url: "http://lcqb.dreamtowns.net/static/helpcenter.html",
          appBar: new AppBar(
            backgroundColor: Colors.white,
            centerTitle: true,
            iconTheme: IconThemeData(
              color: Colors.black,
            ),
            title: new Text(
              '帮助中心',
              style: new TextStyle(color: Colors.black),
            ),
          ),
        ),
        onWillPop: _requestPop);
  }
}
